﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcProject.Models.RatedInfo>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Edit
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        定额名称编辑</h2>
    <% using (Html.BeginForm())
       {%>
    <%: Html.ValidationSummary(true) %>
    <table border="1">
        <tr>
            <th>
                所属类型
            </th>
            <th>
                定额号（不可修改）
            </th>
            <th>
                定额名称
            </th>
            <th>
                单位
            </th>
            <th>
                定额人工费
            </th>
            <th>
                定额付材
            </th>
            <th>
                主材（材料费）
            </th>
            <th>
                机械费
            </th>
        </tr>
        <tr>
            <td>
                <%: Html.DropDownListFor(model => model.RatedType, new SelectList(
                        new List<Object> {
                        new { value = "土建", text = "土建"  }, 
                        new { value = "安装", text = "安装" }, 
                        new { value = "市政", text = "市政" }, 
                        new { value = "园林", text = "园林" } }, "value", "text", "土建"))%>
                <%: Html.ValidationMessageFor(model => model.RatedType) %>
            </td>
            <td>
                <%: Html.TextBoxFor(model => model.RatedCode, new { disabled = "disabled" })%>
            </td>
            <td>
                <%: Html.TextBoxFor(model => model.RatedName) %>
                <%: Html.ValidationMessageFor(model => model.RatedName) %>
            </td>
            <td>
                <%: Html.DropDownListFor(model => model.RatedUnit, new SelectList(
                        new List<Object> {
                        new { value = "只", text = "只" }, 
                        new { value = "10只", text = "10只" }, 
                        new { value = "根", text = "根" },  
                        new { value = "10根", text = "10根" }, 
                        new { value = "座", text = "座" }, 
                        new { value = "台", text = "台" }, 
                        new { value = "个", text = "个" }, 
                        new { value = "10个", text = "10个" }, 
                        new { value = "副", text = "副" }, 
                        new { value = "10副", text = "10副" }, 
                        new { value = "把", text = "把" }, 
                        new { value = "10把", text = "10把" }, 
                        new { value = "m", text = "m" }, 
                        new { value = "10m", text = "10m" }, 
                        new { value = "100m", text = "100m" }, 
                        new { value = "m2", text = "m2" }, 
                        new { value = "10m2", text = "10m2" }, 
                        new { value = "100m2", text = "100m2" }, 
                        new { value = "1000m2", text = "1000m2" },
                        new { value = "m3", text = "m3" }, 
                        new { value = "10m3", text = "10m3" }, 
                        new { value = "100m3", text = "100m3" }, 
                        new { value = "1000m3", text = "1000m3" },  
                        new { value = "t", text = "t" },
                        new { value = "10t", text = "10t" },
                        new { value = "100t", text = "100t" },
                        new { value = "1000t", text = "1000t" },
                        new { value = "樘", text = "樘" },
                        new { value = "套", text = "套" },
                        new { value = "扇", text = "扇" },
                        new { value = "段", text = "段" },
                        new { value = "座", text = "座" },
                        }, "value", "text", "只"))%>
                <%: Html.ValidationMessageFor(model => model.RatedUnit) %>
            </td>
            <td>
                <%: Html.TextBoxFor(model => model.RatedLaborCosts) %>
                <%: Html.ValidationMessageFor(model => model.RatedLaborCosts)%>
            </td>
            <td>
                <%: Html.TextBoxFor(model => model.RateViceMaterials) %>
                <%: Html.ValidationMessageFor(model => model.RateViceMaterials)%>
            </td>
            <td>
                <%: Html.TextBoxFor(model => model.RateMaterials) %>
                <%: Html.ValidationMessageFor(model => model.RateMaterials)%>
            </td>
            <td>
                <%: Html.TextBoxFor(model => model.MachineryCosts) %>
                <%: Html.ValidationMessageFor(model => model.MachineryCosts)%>
            </td>
        </tr>
    </table>
    <p>
        <input type="submit" value="保存" />
    </p>
    <% } %>
    <div>
        <%: Html.ActionLink("返回列表", "Index") %>
    </div>
</asp:Content>
